package com.acminds.acuteauto.persistence.entities;

// Generated May 13, 2012 8:21:43 PM by Hibernate Tools 3.4.0.CR1

import java.util.ArrayList;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import javax.persistence.OneToMany;

import com.acminds.acuteauto.persistence.dto.*;

/**
 * Location generated by customhbm2java
 */
@MappedSuperclass
public abstract class AbstractLocation extends
		com.acminds.acuteauto.persistence.BaseDTO implements
		java.io.Serializable {

	private static final long serialVersionUID = 1L;

	private Integer locationId;
	private Client client;
	private UserInfo userInfo;
	private int locationType;
	private String locationDesc;
	private String address1;
	private String address2;
	private String zip;
	private String city;
	private String state;
	private String homePhone;
	private String cellPhone;
	private String busPhone;
	private String email;
	private String country;
	private Boolean mailing;
	private String notes;
	private List<Residence> residences = new ArrayList<Residence>(0);
	private List<Account> accounts = new ArrayList<Account>(0);
	private List<Employment> employments = new ArrayList<Employment>(0);

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "LOCATION_ID", unique = true, nullable = false)
	public Integer getLocationId() {
		return this.locationId;
	}

	public void setLocationId(Integer locationId) {
		this.locationId = locationId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CLIENT_ID")
	public Client getClient() {
		return this.client;
	}

	public void setClient(Client client) {
		this.client = client;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "USER_INFO_ID")
	public UserInfo getUserInfo() {
		return this.userInfo;
	}

	public void setUserInfo(UserInfo userInfo) {
		this.userInfo = userInfo;
	}

	@Column(name = "LOCATION_TYPE", nullable = false)
	public int getLocationType() {
		return this.locationType;
	}

	public void setLocationType(int locationType) {
		this.locationType = locationType;
	}

	@Column(name = "LOCATION_DESC", length = 100)
	public String getLocationDesc() {
		return this.locationDesc;
	}

	public void setLocationDesc(String locationDesc) {
		this.locationDesc = locationDesc;
	}

	@Column(name = "ADDRESS1", nullable = false, length = 100)
	public String getAddress1() {
		return this.address1;
	}

	public void setAddress1(String address1) {
		this.address1 = address1;
	}

	@Column(name = "ADDRESS2", length = 100)
	public String getAddress2() {
		return this.address2;
	}

	public void setAddress2(String address2) {
		this.address2 = address2;
	}

	@Column(name = "ZIP", nullable = false, length = 5)
	public String getZip() {
		return this.zip;
	}

	public void setZip(String zip) {
		this.zip = zip;
	}

	@Column(name = "CITY", nullable = false, length = 20)
	public String getCity() {
		return this.city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	@Column(name = "STATE", nullable = false, length = 2)
	public String getState() {
		return this.state;
	}

	public void setState(String state) {
		this.state = state;
	}

	@Column(name = "HOME_PHONE", length = 10)
	public String getHomePhone() {
		return this.homePhone;
	}

	public void setHomePhone(String homePhone) {
		this.homePhone = homePhone;
	}

	@Column(name = "CELL_PHONE", length = 10)
	public String getCellPhone() {
		return this.cellPhone;
	}

	public void setCellPhone(String cellPhone) {
		this.cellPhone = cellPhone;
	}

	@Column(name = "BUS_PHONE", length = 15)
	public String getBusPhone() {
		return this.busPhone;
	}

	public void setBusPhone(String busPhone) {
		this.busPhone = busPhone;
	}

	@Column(name = "EMAIL", nullable = false, length = 100)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "COUNTRY", nullable = false, length = 20)
	public String getCountry() {
		return this.country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	@Column(name = "MAILING")
	public Boolean getMailing() {
		return this.mailing;
	}

	public void setMailing(Boolean mailing) {
		this.mailing = mailing;
	}

	@Column(name = "NOTES", length = 200)
	public String getNotes() {
		return this.notes;
	}

	public void setNotes(String notes) {
		this.notes = notes;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "location")
	public List<Residence> getResidences() {
		return this.residences;
	}

	public void setResidences(List<Residence> residences) {
		this.residences = residences;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "location")
	public List<Account> getAccounts() {
		return this.accounts;
	}

	public void setAccounts(List<Account> accounts) {
		this.accounts = accounts;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "location")
	public List<Employment> getEmployments() {
		return this.employments;
	}

	public void setEmployments(List<Employment> employments) {
		this.employments = employments;
	}

}
